/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package TMS;

/**
 *
 * @author Zachary
 */
/*
 * This class is the Clock actor. It's role is to
 * report the system time in seconds and to provide
 * a means to wait for a specified amout of time.
 * 
 */
public class Clock {
    public static double get_time(){
        //return System.currentTimeMillis() / 1000;
        return (double)System.nanoTime()/ (1000000000);
    }
    public static void wait(double interval){
        double elapsed = 0;
        double start_time = get_time();
        double current_time = start_time;
        while(elapsed < interval){
            current_time = get_time();
            elapsed = current_time - start_time;
        }
        return;
    }
}
